
<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.weui_cell_hd {
    padding: 0.6rem;
	padding-left: 0;
}
</style>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'list'">
	<div class="fui-content">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
			<a href="#">
				<img src="{{tomedia(item.image) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div ng-if="pagedata.setting.iscms !=1" class="fe-floatback right" style="left:0.3rem">
				<a href="javascript:void(0);" ng-click="access_json('jy_cms/index/')">
				<i class="icon jinyunicon icon-back"></i>
				</a>
		</div>
<div class="fui-searchbar bar">
    <div ng-class="{'searchbar center':1,'searchbar-active':pagedata.searchbar ==1}">
                <input type="button" ng-click="access(pagedata.op,made_query(pagedata.params))"  value="搜索" class="searchbar-cancel searchbtn">
                <div class="search-input" ng-click="pagedata.searchbar =1">
                    <input type="search" placeholder="输入关键字" class="search" ng-model="pagedata.params.keyword">
                </div>
    </div>
</div>
<div class="jy-content">
		<div class="fui-list-group merchgroup" ng-repeat="item in pagedata.list">
            <div class="fui-list">
                <a class="fui-list-media storelogo" href="javascript:;" ng-click="access_json('jy_cmsactivity/index/detail/id='+item.id)">
                    <img class="round" ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
                </a>
                <a class="fui-list-inner" style="margin-top:0.16rem" href="javascript:;" ng-click="access_json('jy_cmsactivity/index/detail/id='+item.id)">
                    <div class="title" style="font-size:0.76rem">{{item.title}}</div>
                    <div class="store-star">
						<span class="star-on"> <img src="../core/resource/images/star-off.png"></span>
						<span class="star-off" style="width: 88%;"> <img src="../core/resource/images/star-on.png"></span>
						<span class="star-rate">4.5</span>
						<span>已报名人数：{{item.num}}</span>
						<span>还可报名人数:{{item.left}}</span>
					</div>
					<div class="subtitle" style="font-size:0.55rem">
						<div class="store-moneylimit">
						  <span>报名费用¥{{item.money}}</span>
						  <span class="store-distance"> 活动时长：约{{item.duration}}小时</span>
						</div>
					</div>
                </a>
            </div>
		</div>
		<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
	</div>
</div>
</div>
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'detail'">
	<div class="fui-content">
		<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
			<a href="#">
				<img src="{{tomedia(item.image) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		<div class="weui_cells weui_cells_form" style="margin-top:0">
			<div class="weui_cell">
				<div class="weui_cell_hd"><label class="weui_label"><i class="icon jinyunicon icon-gerenzhongxin" ></i> 访问:{{pagedata.activity.readnum || '0'}}次<i class="icon jinyunicon icon-yuding" style="margin-left:0.3rem"></i> 报名:{{pagedata.activity.num || '0'}}人<span class="store-distance" style="margin-left:0.3rem"> 活动时长：约{{pagedata.activity.duration}}小时</span></label></div>
			</div>
		</div>
		<div ng-if="pagedata.activity.remark"  class="weui_cells_title">活动介绍：</div>
		<div ng-if="pagedata.activity.remark" ng-bind-html="trust(pagedata.activity.remark)" class="weui_cells content-images">
					<div class="weui_cell desc">
						{{pagedata.activity.remark}}
					 </div>
		</div>
		<div class="weui_cells">
			<div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">活动地址：</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_cell_hd"><label class="weui_label">{{pagedata.activity.address}}</label></div>					
                </div>
			</div>
			<div ng-if="pagedata.activity.organize" class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">活动发起方：</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_cell_hd"><label class="weui_label">{{pagedata.activity.organize}}</label></div>					
                </div>
			</div>
			<div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">活动开始时间：</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_cell_hd"><label class="weui_label">{{pagedata.activity.time}}</label></div>					
                </div>
			</div>
			<div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">报名截止时间：</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_cell_hd"><label class="weui_label">{{pagedata.activity.end}}</label></div>					
                </div>
			</div>
		</div>
		<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:"  ng-click="pagedata.check_buy()">立即报名</a>
		</div>
</div>
<script type="text/javascript">
</script>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
	require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
scope.pagedata.check_buy=function(){
	var activityid=scope.pagedata.activity.id
	scope.get('jy_cmsactivity/index/check_buy/activityid='+activityid,function(res){});
}
</script>